package game.metalmax.packet.server {

	import flash.utils.ByteArray;
	
	import game.metalmax.packet.IPacket;

//登陆响应
public class LoginResponse implements IPacket{

	//结果 1:登录成功 2 :用户名错误 3:数据异常
	public var result:int;
	//帐号
	public var email:String;
	//密码
	public var secret:String;

	public function write(out:ByteArray):void{
		var len:int = 0;
		var i:int = 0;
		out.writeInt(result);
		out.writeUTF(email==null?"":email);
		out.writeUTF(secret==null?"":secret);
	}
	public function read(inn:ByteArray):void{
		var len:int = 0;
		var i:int = 0;
		result = inn.readInt();
		email = inn.readUTF();
		secret = inn.readUTF();
}
}
}